﻿using System;
using System.Text;
using System.Collections.Generic;

namespace LMD.Lib.DataClass
{
    [Serializable]
    public class UserData
    {
        public String ID = String.Empty;

        public String sxName = String.Empty;
        public String sxOrganization = String.Empty;
        public String sxEmailAddress = String.Empty;
        public String sxJobPosition = String.Empty;

        private Dictionary<String, String> p_dicMisc = new Dictionary<String,String>();

        public Dictionary<String, String> GetCustomDataDictionary()
        {
            return p_dicMisc;
        }

        public void AddCustomData(String key, String value)
        {
            p_dicMisc.Add(key, value);
        }

        public void ChangeCustomData(String key, String value)
        {
            if (p_dicMisc.ContainsKey(key))
                p_dicMisc[key] = value;
            else
                p_dicMisc.Add(key, value);
        }

        public String GetCustomData(String key)
        {
            if (p_dicMisc.ContainsKey(key))
                return p_dicMisc[key];
            else
                return String.Empty;
        }        
    }
}
